﻿<UserControl xmlns:my="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  x:Class="GeoVision.BingMap.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
   d:DesignHeight="768" d:DesignWidth="1601" Loaded="UserControl_Loaded">

    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="260" />
            <ColumnDefinition Width="1341*" />
        </Grid.ColumnDefinitions>
        <my:Map Center="38.4,27" ZoomLevel="9" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="MyMap"  Grid.Column="1" Grid.Row="0">
            <my:MapLayer x:Name="MyLayer" />
        </my:Map>
        <Canvas x:Name="canvasTop" Background="White" Opacity="0" MouseLeftButtonDown="canvasTop_MouseLeftButtonDown" MouseMove="canvasTop_MouseMove" MouseLeftButtonUp="canvasTop_MouseLeftButtonUp" Grid.Column="1"></Canvas>
        <Border BorderBrush="Black" CornerRadius="10" BorderThickness="5">
            <StackPanel Margin="10,10,6,10" Orientation="Vertical" Background="White">
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="25" />
                    </Grid.ColumnDefinitions>
                </Grid>
                <Button  Margin="5" x:Name="installBtn" Click="installBtn_Click">
                    <TextBlock>Install</TextBlock>
                </Button>
                <Button Name="btnSec" Click="btnSec_Click" Margin="5">
                    <TextBlock>Select the area for picture</TextBlock>
                </Button>
                <Button Name="btnFinish" Click="btnFinish_Click" Margin="5">
                    <TextBlock>Get selected area as image</TextBlock>
                </Button>
                <Button Name="btnRemove" Click="btnRemove_Click" Margin="5">
                    <TextBlock>Remove Selection</TextBlock>
                </Button>

                <Grid Margin="3">
                    <sdk:Label Margin="3" Content="Latitude 1"/>
                    <TextBlock Margin="85,5,5,5" x:Name="txtAlt" Height="20"></TextBlock>
                </Grid>
                <Grid Margin="3">
                    <sdk:Label  Margin="3" Content="Longitude 1"/>
                    <TextBlock Margin="85,5,5,5" x:Name="txtLong" Height="20">
                    </TextBlock>
                </Grid>
                <Grid Margin="3">
                    <sdk:Label Margin="3" Content="Latitude 2"/>
                    <TextBlock Margin="85,5,5,5" x:Name="txtAlt2" Height="20" >
                    </TextBlock>
                </Grid>
                <Grid Margin="3">
                    <sdk:Label Margin="3" Content="Longitude 2"/>
                    <TextBlock Margin="85,5,5,5" x:Name="txtLong2" Height="20">
                    </TextBlock>
                </Grid>
                <Grid>
                    <toolkit:Expander Header="RECTANGLE AREA" Height="100" IsExpanded="True" IsEnabled="False">
                        <Border>
                            <Grid Margin="3">
                                <Grid.RowDefinitions>
                                    <RowDefinition></RowDefinition>
                                    <RowDefinition></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="76"></ColumnDefinition>
                                    <ColumnDefinition Width="148"></ColumnDefinition>
                                </Grid.ColumnDefinitions>
                                <sdk:Label Margin="3" Content="Widht" Grid.Row="0" Grid.Column="0"/>
                                <TextBlock Margin="7,5,5,5" x:Name="txtWidth" Height="20" Grid.Column="1" Width="136">
                                </TextBlock>
                                <sdk:Label Margin="3" Content="Height" Grid.Row="1" Grid.Column="0"/>
                                <TextBlock Margin="7,5,5,5" x:Name="txtHeight" Height="20" Grid.Row="1" Grid.Column="1" Width="136">
                                </TextBlock>
                            </Grid>
                        </Border>
                    </toolkit:Expander>
                </Grid>
                <Button Name="btnEnterKey" Click="btnEnterKey_Click" Margin="5">
                    <TextBlock>Enter Key</TextBlock>
                </Button>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
